﻿#include "MaterialPropertyNodeViewModel.h"

#include "MaterialPropertyNodeModel.h"
#include "MaterialGraph/Node/MaterialGraphNodeModel.h"
#include "MaterialGraph/MaterialGraphViewModel.h"

#include "MaterialGraph/Pin/MaterialGraphPinViewModel.h"

void RMaterialPropertyNodeViewModel::BindModel(TSharedObjectPtr<RMaterialGraphNodeModel> InModel, TSharedObjectPtr<RMaterialGraphViewModel> InGraph)
{
    Super::BindModel(InModel, InGraph);

    PropertyModel =InModel;

    //assgin line index
    //line 0 is the title
    OutputViewModels[0]->SetLineIndex(1);
    OutputViewModels[1]->SetLineIndex(2);    
}

int64_t RMaterialPropertyNodeViewModel::GetLineNum() const
{
    return 3;
}

CString RMaterialPropertyNodeViewModel::GetOutputPinName(int64_t Index) const
{
    switch (Index)
    {
    case 0:
        return U"纹理坐标(UV)";

    case 1:
        return U"场景位置";

    default:
        return U"";
    }
}
